﻿using System.Collections.Generic;
using System.Linq;
using VirtualDeveloper.Filters;
using Xunit;

namespace UnitTest
{
    public class DocumentLineFragmentTest
    {
        [Fact]
        public void Return_1_line_per_10()
        {
            var actual = new LineSkipper<int>(Enumerable.Range(1, 20), 10).ToList();

            Assert.Equal(2, actual.Count);
            Assert.Equal(10, actual[0]);
            Assert.Equal(20, actual[1]);
        }

        [Fact]
        public void Return_1_line_per_2()
        {
            var list = new LineSkipper<string>(new List<string> { "one", "two", "three" }, 2);

            Assert.Equal("two", list.First());
        }
    }
}